package com.sugar.psych.assessment.module.business.dal.mysql.configrisklevel;

import java.util.*;

import com.sugar.psych.assessment.framework.common.pojo.PageResult;
import com.sugar.psych.assessment.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.sugar.psych.assessment.framework.mybatis.core.mapper.BaseMapperX;
import com.sugar.psych.assessment.module.business.dal.dataobject.configrisklevel.ConfigRiskLevelDO;
import org.apache.ibatis.annotations.Mapper;
import com.sugar.psych.assessment.module.business.controller.admin.configrisklevel.vo.*;

/**
 * 风险等级配置 Mapper
 *
 * @author Ysugar
 */
@Mapper
public interface ConfigRiskLevelMapper extends BaseMapperX<ConfigRiskLevelDO> {

    default PageResult<ConfigRiskLevelDO> selectPage(ConfigRiskLevelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ConfigRiskLevelDO>()
                .eqIfPresent(ConfigRiskLevelDO::getRiskLevel, reqVO.getRiskLevel())
                .betweenIfPresent(ConfigRiskLevelDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ConfigRiskLevelDO::getId));
    }

}